package com.lagou.service.impl;

import com.lagou.service.HelloService;
import org.apache.dubbo.rpc.RpcContext;

/**
 * <h1>问候服务实现类</h1>
 * @author yzh
 */
public class HelloServiceImpl implements HelloService {

    @Override
    public String sayHello(String name) {
        String consumerIP = RpcContext.getContext().get("CLIENT_IP")+"";
        String result = "问候服务调用成功,客户端的IP地址为:"+consumerIP;
        System.out.println(result);
        return result;
    }
}
